<%@include file="../viewPartials/header.jsp" %>
<c:url value="Home" var="homeUrl" />


<h1>New folder</h1>
<c:choose>
    <c:when test="${param.success == 'true'}">
        Folder saved! <a href="${homeUrl}">Back</a>
    </c:when>
    <c:otherwise>
        
        <c:if test="${formErrors != null}">
            <div class="formErrors">
                <c:forEach var="v" items="${formErrors}">
                    ${fn:escapeXml(v.getMessage())}<br>
                </c:forEach>
            </div>
        </c:if>
        
        <form method="post" action="">
            <table class="tblForm">
                <tr>
                    <td width="60"><label for="name">Name</label></td>
                    <td><input value="${fn:escapeXml(folder.name)}" id="name" name="name" type="text"></td>
                </tr>
                <tr>
                    <td><label>Parent</label></td>
                    <td>
                        <div id="treeSelectParent" class="ReinListbox" style="height: 290px; width: 340px;"></div>
                        <input id="txtHiddenParentId" type="hidden" name="parentId">
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td><input name="submit" type="submit" value="Save"></td>
                </tr>
            </table>
            <a href="${homeUrl}">Back</a>
        </form>
    </c:otherwise>
</c:choose>


<%@include file="../viewPartials/footer.jsp" %>